package com.str;

import java.util.Collection;

public class StingDemo0 {
	public static void main(String[] args) {

		// System.out.println(new WaO().getClass().getSimpleName());
		// new A().start();
		String s = "A";
		String s2 = "A";
		String s3 = "AA";
		String s4 = s + s2;
		String s5 = "1";
		String s6 = "12";
		String s7 = "123";
		int hashcode = s7.hashCode();
		//
		System.out.println(s == s2);// true
		System.out.println(s3 == s4);// false
		int i1[] = new int[10];
		int i2[] = new int[10];
		for (int i = 0; i < i1.length; i++) {
			i1[i] = i;
		}
		i2 = i1;
		for (int i = 0; i < i2.length; i++) {
			// System.out.println(i2[i]);
		}

		int sum = 0;
		System.out.println(fact(4));
		for (int i = 0; i < 4; i++) {
			System.out.println(fact(i));
			sum += fact(i);
		}
		System.out.println(sum);

	}

	private static long fact(int i) {

		if (i == 1 || i == 0)
			return i;
		return fact(i - 1) * i;
	}

}
